package cn.maihe.elg.operation.model.enums;

import java.util.Arrays;

/**
 * @Description
 * @Author Alan
 * @Date 2025/04/21
 */
public enum BidderLevel {
    ONE("1", "一级资质"),
    TWO("2", "二级资质"),
    THREE("3", "三级资质"),
    ;

    private String level;
    private String desc;

    BidderLevel(String level, String desc) {
        this.level = level;
        this.desc = desc;
    }

    public String getLevel() {
        return level;
    }

    public String getDesc() {
        return desc;
    }

    public static BidderLevel resolve(String level) {
        return Arrays.stream(values()).filter(o -> o.getLevel().equals(level)).findFirst().orElse(null);
    }
}
